<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

   <title>Problem D - Maximum Product</title>
</head><body>

<h1 align="center">Problem D - Maximum Product</h1>
<h3 align="center">Time Limit: 1 second</h3>

<div>
</div>

<p>
</p>

<p>
Given a sequence of integers <b>S = {S<sub>1</sub>, S<sub>2</sub>, ..., S<sub>n</sub>}</b>, you should
determine what is the value of the maximum positive product involving consecutive terms of <b>S</b>. If
you cannot find a positive sequence, you should consider <b>0</b> as the value of the maximum product.
</p>


<h2>Input</h2>

<p>
Each test case starts with <b>1 ≤ N ≤ 18</b>, the number of elements in a sequence. Each element
<b>S<sub>i</sub></b> is an integer such that <b>-10 ≤ S<sub>i</sub> ≤ 10</b>. Next line will have
<b>N</b> integers, representing the value of each element in the sequence. There is a blank line after
each test case. The input is terminated by end of file (EOF).
</p>

<h2>Output</h2>

<p>
For each test case you must print the message: <b>Case #M: The maximum product is P.</b>, where <b>M</b> is
the number of the test case, starting from <b>1</b>, and <b>P</b> is the value of the maximum product. After
each test case you must print a blank line.
</p>

<h2>Sample Input</h2>

<pre>3
2 4 -3

5
2 5 -1 2 -1

</pre>

<h2>Sample Output</h2>

<pre>Case #1: The maximum product is 8.

Case #2: The maximum product is 20.

</pre>

<hr>

<b>Problem setter: Sérgio Queiroz de Medeiros</b>

</body></html>